package org.crackjack.services;

import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;

public class GenericController {

    protected <T> ResponseEntity<T> getResponseInJsonType(T entity) {
        HttpHeaders responseHeaders = new HttpHeaders();
        responseHeaders.setContentType(MediaType.APPLICATION_JSON);

        return new ResponseEntity<T>(entity, responseHeaders, HttpStatus.OK);
    }
}
